import com.atguigu.realtime.app.BaseSQLApp;
import com.atguigu.realtime.util.SqlUtil;
import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment;
import org.apache.flink.table.api.bridge.java.StreamTableEnvironment;

/**
 * @Author lzc
 * @Date 2022/5/30 9:15
 */
public class JoinConsume1 extends BaseSQLApp {
    public static void main(String[] args) {
        new JoinConsume1().init(10000,2, "JoinConsume1");
    }
    @Override
    protected void handle(StreamExecutionEnvironment env,
                          StreamTableEnvironment tEnv) {
        tEnv.executeSql("create table t12(" +
                            "id1 string, " +
                            "name string, " +
                            "id2 string, " +
                            "age int " +
                            ")" + SqlUtil.getKafkaReadDDL("t12", "abc"));
        
        tEnv.sqlQuery("select * from t12").execute().print();
        
    }
}
